WSGISocketPrefix run/wsgi
#WSGIRestrictStdout On
WSGIRestrictSignal Off
WSGIPythonOptimize 1
WSGIPassAuthorization On
WSGIDaemonProcess pagureproc user=pagure group=packager maximum-requests=1000 display-name=pagure processes={{ wsgi_procs }} threads={{ wsgi_threads }} inactivity-timeout=300


  WSGIScriptAlias / /var/www/pagure.wsgi

#  SSLEngine on
#  SSLProtocol all -SSLv2 -SSLv3
#  # Use secure TLSv1.1 and TLSv1.2 ciphers
#  Header always add Strict-Transport-Security "max-age=15768000; includeSubDomains; preload"

#  SSLCertificateFile /etc/pki/tls/certs/pagure.io.cert
#  SSLCertificateChainFile /etc/pki/tls/certs/pagure.io.intermediate.cert
#  SSLCertificateKeyFile /etc/pki/tls/certs/pagure.io.key

  Alias /static /usr/lib/python2.7/site-packages/pagure/static/
  Alias /grokmirror /srv/git/grokmirror

  SetEnv GIT_PROJECT_ROOT /srv/git/repositories

  AliasMatch ^/(.*/objects/[0-9a-f]{2}/[0-9a-f]{38})$          /srv/git/repositories/$1
  AliasMatch ^/(.*/objects/pack/pack-[0-9a-f]{40}.(pack|idx))$ /srv/git/repositories/$1
  ScriptAliasMatch \
    "(?x)^/(.*/(HEAD | \
    info/refs | \
    objects/info/[^/]+ | \
    git-(upload|receive)-pack))$" \
    /usr/libexec/git-core/git-http-backend/$1

  <Location />
   WSGIProcessGroup pagureproc
   <IfModule mod_authz_core.c>
      # Apache 2.4
      Require all granted
   </IfModule>
   <IfModule !mod_authz_core.c>
      # Apache 2.2
      Order deny,allow
      Allow from all
   </IfModule>
  </Location>

#</VirtualHost>

RewriteEngine on

# First try the instance-specific theme
RewriteCond "/usr/share/pagure_dist_git/static/$1" -f
RewriteRule "^/static/(.*)" "/usr/share/pagure_dist_git/static/$1" [L]

# Use the application default theme for files not customized
RewriteRule "^/static/(.*)" "/usr/lib/python2.7/site-packages/pagure/static/$1" [L]
